<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%-- create java bean object --%>
<jsp:useBean id="logonimg" class="com.helloworld.Image" scope="request"></jsp:useBean>
<jsp:setProperty property="x" param="logon.x" name="logonimg"/>
<jsp:setProperty property="y" param="logon.y" name="logonimg"/>

<%-- create another java bean object --%>
<jsp:useBean id="regimg" class="com.helloworld.Image" scope="request"></jsp:useBean>
<jsp:setProperty property="x" param="reg.x" name="regimg"/>
<jsp:setProperty property="y" param="reg.y" name="regimg"/>

<% if(logonimg.isSelected()) { %>
<jsp:forward page="logon.jsp"></jsp:forward>
<% } else if (regimg.isSelected()) { %>
<jsp:forward page="reg.jsp"></jsp:forward>
<% } %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>